var $mTokenOk = false;
var $mTokenOkExceptSuffix = false;
var $mTriedSave = false;
+ var $incompleteForm = false;
var $tooBig = false;
var $kblength = false;
var $missingComment = false;
$this->scrolltop = $request->getIntOrNull( 'wpScrolltop' );
- if ( is_null( $this->edittime ) ) {
+ if ($this->textbox1 === '' && $request->getVal( 'wpTextbox1' ) === null) {
+ // wpTextbox1 field is missing, possibly due to being "too big"
+ // according to some filter rules such as Suhosin's setting for
+ // suhosin.request.max_value_length (d'oh)
+ $this->incompleteForm = true;
+ } else {
+ // edittime should be one of our last fields; if it's missing,
+ // the submission probably broke somewhere in the middle.
+ $this->incompleteForm = is_null( $this->edittime );
+ }
+ if ( $this->incompleteForm ) {
# If the form is incomplete, force to preview.
wfDebug( __METHOD__ . ": Form data appears to be incomplete\n" );
wfDebug( "POST DATA: " . var_export( $_POST, true ) . "\n" );
} else {
$note = wfMsg( 'session_fail_preview' );
}
+ } else if ( $this->incompleteForm ) {
+ $note = wfMsg( 'edit_form_incomplete' );
} else {
$note = wfMsg( 'previewnote' );
}
'token_suffix_mismatch' => "'''Your edit has been rejected because your client mangled the punctuation characters in the edit token.'''
The edit has been rejected to prevent corruption of the page text.
This sometimes happens when you are using a buggy web-based anonymous proxy service.",
+'edit_form_incomplete' => "'''Some parts of the edit form did not reach the server; double-check that your edits are intact and try again.'''",
'editing' => 'Editing $1',
'editingsection' => 'Editing $1 (section)',
'editingcomment' => 'Editing $1 (new section)',